export default {
  name: 'SlotRender',
  functional: true,
  inject: ['tableRoot'],
  props: {
    row: Object,
    column: Object,
    index: Number,
  },
  render(h, ctx) {
    const {
      injections: { tableRoot },
      props: { row, column, index },
    } = ctx

    return h(
      'div',
      tableRoot.$scopedSlots[column.slot]({
        row,
        column,
        index,
      })
    )
  },
}
